commit c07cdb6ae80b0847da58a6acb1022b8b3e170073
Author: Žan Doberšek <zdobersek@igalia.com>
Date:   Fri Mar 10 07:33:08 2023 -0800

    Unreviewed build fixes for RISCV64
    https://bugs.webkit.org/show_bug.cgi?id=253700
    
    Unreviewed build fixes for RISCV64 builds of JavaScriptCore.
    
    * Source/JavaScriptCore/assembler/MacroAssembler.h: Enable the moveFloat and
    moveDouble methods that work with immediate values, sharing the scratch register
    variant with x86-64.
    * Source/JavaScriptCore/offlineasm/riscv64.rb: Also generate WASM placeholders
    for the loadv and storev opcodes, used in WebAssembly.asm.
    * Source/WTF/wtf/PlatformEnable.h: Avoid further compilation issues by enabling
    ENABLE_WEBASSEMBLY_B3JIT alongside ENABLE_WEBASSEMBLY.
    
    Canonical link: https://commits.webkit.org/261498@main

Index: webkit2gtk-2.39.91/Source/JavaScriptCore/assembler/MacroAssembler.h
===================================================================
--- webkit2gtk-2.39.91.orig/Source/JavaScriptCore/assembler/MacroAssembler.h
+++ webkit2gtk-2.39.91/Source/JavaScriptCore/assembler/MacroAssembler.h
@@ -1618,7 +1618,7 @@
 
 #endif // USE(JSVALUE64)
 
-#if CPU(X86_64)
+#if CPU(X86_64) || CPU(RISCV64)
     void moveFloat(Imm32 imm, FPRegisterID dest)
     {
         move(imm, scratchRegister());
Index: webkit2gtk-2.39.91/Source/JavaScriptCore/offlineasm/riscv64.rb
===================================================================
--- webkit2gtk-2.39.91.orig/Source/JavaScriptCore/offlineasm/riscv64.rb
+++ webkit2gtk-2.39.91/Source/JavaScriptCore/offlineasm/riscv64.rb
@@ -1523,7 +1523,8 @@
         if node.is_a? Instruction
             case node.opcode
             when "loadlinkacqb", "loadlinkacqh", "loadlinkacqi", "loadlinkacqq",
-                 "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq"
+                 "storecondrelb", "storecondrelh", "storecondreli", "storecondrelq",
+                 "loadv", "storev"
                 newList << Instruction.new(node.codeOrigin, "rv_ebreak", [], "WebAssembly placeholder for opcode #{node.opcode}")
             else
                 newList << node
Index: webkit2gtk-2.39.91/Source/WTF/wtf/PlatformEnable.h
===================================================================
--- webkit2gtk-2.39.91.orig/Source/WTF/wtf/PlatformEnable.h
+++ webkit2gtk-2.39.91/Source/WTF/wtf/PlatformEnable.h
@@ -616,7 +616,7 @@
 #undef ENABLE_WEBASSEMBLY
 #define ENABLE_WEBASSEMBLY 1
 #undef ENABLE_WEBASSEMBLY_B3JIT
-#define ENABLE_WEBASSEMBLY_B3JIT 0
+#define ENABLE_WEBASSEMBLY_B3JIT 1
 #undef ENABLE_WEBASSEMBLY_BBQJIT
 #define ENABLE_WEBASSEMBLY_BBQJIT 0
 #endif
